package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchCurveAnalysisResultsMapper;
import com.ruoyi.system.domain.DispatchCurveAnalysisResults;
import com.ruoyi.system.service.IDispatchCurveAnalysisResultsService;

/**
 * 曲线分析结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchCurveAnalysisResultsServiceImpl implements IDispatchCurveAnalysisResultsService 
{
    @Autowired
    private DispatchCurveAnalysisResultsMapper dispatchCurveAnalysisResultsMapper;

    /**
     * 查询曲线分析结果
     * 
     * @param curveAnalysisResultsId 曲线分析结果主键
     * @return 曲线分析结果
     */
    @Override
    public DispatchCurveAnalysisResults selectDispatchCurveAnalysisResultsByCurveAnalysisResultsId(Long curveAnalysisResultsId)
    {
        return dispatchCurveAnalysisResultsMapper.selectDispatchCurveAnalysisResultsByCurveAnalysisResultsId(curveAnalysisResultsId);
    }

    /**
     * 查询曲线分析结果列表
     * 
     * @param dispatchCurveAnalysisResults 曲线分析结果
     * @return 曲线分析结果
     */
    @Override
    public List<DispatchCurveAnalysisResults> selectDispatchCurveAnalysisResultsList(DispatchCurveAnalysisResults dispatchCurveAnalysisResults)
    {
        return dispatchCurveAnalysisResultsMapper.selectDispatchCurveAnalysisResultsList(dispatchCurveAnalysisResults);
    }

    /**
     * 新增曲线分析结果
     * 
     * @param dispatchCurveAnalysisResults 曲线分析结果
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchCurveAnalysisResults(DispatchCurveAnalysisResults dispatchCurveAnalysisResults)
    {
        return dispatchCurveAnalysisResultsMapper.insertDispatchCurveAnalysisResults(dispatchCurveAnalysisResults);
    }

    /**
     * 修改曲线分析结果
     * 
     * @param dispatchCurveAnalysisResults 曲线分析结果
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchCurveAnalysisResults(DispatchCurveAnalysisResults dispatchCurveAnalysisResults)
    {
        return dispatchCurveAnalysisResultsMapper.updateDispatchCurveAnalysisResults(dispatchCurveAnalysisResults);
    }

    /**
     * 批量删除曲线分析结果
     * 
     * @param curveAnalysisResultsIds 需要删除的曲线分析结果主键
     * @return 结果
     */
    @Override
    public int deleteDispatchCurveAnalysisResultsByCurveAnalysisResultsIds(Long[] curveAnalysisResultsIds)
    {
        return dispatchCurveAnalysisResultsMapper.deleteDispatchCurveAnalysisResultsByCurveAnalysisResultsIds(curveAnalysisResultsIds);
    }

    /**
     * 删除曲线分析结果信息
     * 
     * @param curveAnalysisResultsId 曲线分析结果主键
     * @return 结果
     */
    @Override
    public int deleteDispatchCurveAnalysisResultsByCurveAnalysisResultsId(Long curveAnalysisResultsId)
    {
        return dispatchCurveAnalysisResultsMapper.deleteDispatchCurveAnalysisResultsByCurveAnalysisResultsId(curveAnalysisResultsId);
    }
}
